﻿@using mvc.Models.Database
        <div id="main">
            <ul id="main_ul">
                @{

                    var news = ViewData["news"] as List<News>;
                    for (int i = 1; i <= 3; i++)
                    {
                        var list = news.Skip((i - 1) * 2).Take(2).ToList();
                        foreach (var item in list)
                        {
                            <li>
                                <a href="/detail.html?newsid=@item.Newsid">
                                    <img src="@item.Img">
                                    <p>@item.Title</p>
                                    <p>@item.Text</p>
                                    <p>发布时间:@item.Time</p>
                                    <p>文章来源:@item.Source</p>
                                </a>
                            </li>
                        }
                    }

                }


            </ul>
        </div>
        <div class="paging">
            <ul class="pagination">
                <li><a href="javascript:void(0)">«</a></li>
                <li><a class="active" href="javascript:void(0)">1</a></li>
                <li><a href="javascript:void(0)">2</a></li>
                <li><a href="javascript:void(0)">3</a></li>
                <li><a href="javascript:void(0)">4</a></li>
                <li><a href="javascript:void(0)">5</a></li>
                <li><a href="javascript:void(0)">6</a></li>
                <li><a href="javascript:void(0)">7</a></li>
                <li><a href="javascript:void(0)">»</a></li>
            </ul>
        </div>
       